package openbang.account.service.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * 记录一个聊天群的基本信息
 * 
 * 该对象要传递到 GWT 客户端,罗列列表
 * 
 * @author aibozeng
 *
 */

@SuppressWarnings("serial")
public class ChatGroup implements Serializable{
	private String groupId = "";//群的唯一标识,由系统产生
    private String subject = "";//主题
    private String creator = "";//创建人的  session id
    private String niceName = "";// 昵称
    
    private String password = "";//加密的聊天室
    private Date createDate = new Date();
    
    /**
     * TODO 变化可能比较大,应该单独一个 cache key存放
     */
    private Set<String> participants = new HashSet<String>();
    
    public ChatGroup(){    	
    }
    
    public ChatGroup(String groupId , String subject){
    	this.groupId = groupId;
    	this.subject = subject;
    }

    public ChatGroup(String groupId , String subject , String password , String niceName){
    	this.groupId = groupId;
    	this.subject = subject;
    	this.password = password;
    	this.niceName = niceName;
    }
    
	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getNiceName() {
		return niceName;
	}

	public void setNiceName(String niceName) {
		this.niceName = niceName;
	}
	public Set<String> getParticipants() {
		return participants;
	}

	public void setParticipants(Set<String> participants) {
		this.participants = participants;
	}

}
